
cd "${utils}"

forvalues y = 2008/2014 {
	
	file open myfile using "${utils}\extract_gecir.sas", write replace
	// Edit path to store resulting source datafile
	file write myfile `"libname gecir "${rawsource}\BGCI_GECIR_GECIR";"' _n
	file write myfile `"proc export data = gecir.gecir_`y'"' _n
	file write myfile `"outfile = '${tmp}\gecir_`y''"' _n
	file write myfile `"dbms = dta replace ; run; "'_n
	file close myfile

	shell "${SASPath}" "${utils}\extract_gecir.sas"
	}
	
	
foreach f in dec_2069a_092020 d_2069_liasses_082023_diff {
	global f `f'
	file open myfile using "${utils}\extract_gecir.sas", write replace
	// Edit path to store resulting source datafile
	file write myfile `"libname gecir "${rawsource}\BGCI_GECIR_GECIR";"' _n
	file write myfile `"proc export data = gecir.`f'"' _n
	file write myfile `"outfile = '${tmp}/${f}'"' _n
	file write myfile `"dbms = dta replace ; run; "'_n
	file close myfile

	shell "${SASPath}" "${utils}\extract_gecir.sas"
}


